import axios from 'axios'
import qs from 'qs'
// import {BASE_DOMAIN_URL} from'@/common/config/common_domain'   引入配置文件中的域名或者URl，方便部署
const services = dse.base_api_url;

//获取获取管道流量监测
export function getPipeWaterFlowMonitor(params) {
    return new Promise((resolve, reject) => {
        let url = `${services}/monitor/getPipeWaterFlowMonitor.do`;
        axios.post(url, QS.stringify(params), {
            headers: {
                "Content-type": "application/x-www-form-urlencoded"
            }
        })
            .then(response => {
                resolve(response.data);
            }).catch((error) => {
                reject(error);
            })
    })
}

//获取获取管道流量监测
export function getPipeWaterGageMonitor(params) {
    return new Promise((resolve, reject) => {
        let url = `${services}/water/getPipeWaterGageMonitor.do`;
        axios.post(url, QS.stringify(params), {
            headers: {
                "Content-type": "application/x-www-form-urlencoded"
            }
        })
            .then(response => {
                resolve(response.data);
            }).catch((error) => {
                reject(error);
            })
    })
}